import React, {Component} from 'react';

const datas=[
  {id:"01",det:"小吴好帅"},
  {id:"02",det:"小吴代码写的好"},
  {id:"03",det:"小吴最霸气"}
]
export default class Detail extends Component {
	render() {
    // 获取传入的参数
		const {id, title} = this.props.match.params;
    // 对比查询数据
    const obj= datas.find(obj=>{
        return obj.id===id
      })
		return (
			<ul>
				<li>ID:{obj.id}</li>
				<li>title:{title}</li>
        <li>msg:{obj.det}</li>
			</ul>
		);
	}
}
